package com.hs.service;

import com.hs.bean.Dept;
import com.hs.dao.DeptDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
*
 *                                                    __----~~~~~~~~~~~------___
 *                                   .  .   ~~//====......          __--~ ~~
 *                   -.            \_|//     |||\\  ~~~~~~::::... /~
 *                ___-==_       _-~o~  \/    |||  \\            _/~~-
 *        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *  .~       .~       |   \\ -_    /  /-   /   ||      \   /
 * /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 * |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *          '         ~-|      /|    |-~\~~       __--~~
 *                      |-~~-_/ |    |   ~\_   _-~            /\
 *                           /  \     \__   \/~                \__
 *                       _--~ _/ | .-~~____--~-/                  ~~==.
 *                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                 -_     ~\      ~~---l__i__i__i--~~_/
 *                                 _-~-__   ~)  \--______________--~~
 *                               //.-~~~-~_--~- |-------~~~~~~~~
 *                                      //.-~~~--\
 *                               神兽保佑
 *                              代码无BUG!
*/
@Service
public class DeptServiceImpl implements DeptService {
    @Resource
    private DeptDao deptDao;

    @Override
    public List<Dept> QueryAll() {
        return deptDao.QueryAll();
    }

    @Override
    public Dept QueryById(Integer id) {
        return deptDao.QueryById(id);
    }

    @Override
    public String QueryHigh(Integer pid) {
        return deptDao.QueryHigh(pid);
    }

    @Override
    public void add(Dept dept) {
        deptDao.add(dept);
    }

    @Override
    public Integer findDeptnum(Integer did) {
        return deptDao.findDeptnum(did);
    }

    @Override
    public void update(Dept dept) {
        deptDao.update(dept);
    }

    @Override
    public void delete(Integer id, Integer state) {
        deptDao.delete(id, state);
    }

}
